<template>
	<view style="display: flex;flex-direction: column;width: 100%;">
		<view style="display: flex;align-items: center;">
			<image :src="data.avatar" style="width: 70rpx;height: 70rpx;border-radius: 8rpx;" mode=""></image>
			<view style="display: flex;flex-direction: column;flex:1;margin-left: 12rpx;">
				<view class="">
					{{data.name}}
				</view>
				<view style="font-size: 25rpx;color: #999999;">
					{{makePhoneStr(data.phone)}}
				</view>
			</view>
		</view>
		<u-line margin="30rpx"></u-line>
		<view style="color: #333;font-size: 26rpx;">
			签名：{{data.note}}
		</view>
		<view style="color: #333;font-size: 26rpx;">
			来源：{{data.searchType ? "搜索" : "扫码" }}
		</view>
		<u-line margin="30rpx"></u-line>
		<view style="width: 600rpx;margin: 30rpx auto 100rpx auto;display: flex;justify-content: space-between;">
			<u-button shape="circle" type="primary" size="medium">申请添加好友</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		name:"userInfo",
		data(){
			return {
				data:{
					
				}
			}
		},
		props:{
			data:{
				type:Object,
				default:function(){
					return {
						avatar:"/static/images/icon_defaultavatar.png"
					}
				}
			},
		},
		methods:{
			makePhoneStr: function(tel) {
				if(!tel) return ""
				return tel.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
			}
		}
	}
</script>

<style>
</style>